package com.xiyou.luckdraw.api.dto.user;

import com.xiyou.luckdraw.common.result.AbstractRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ClassName: UserInfoListRequest
 * @Description:
 * @author: limingxing
 * @Date: 2019-10-11 16:56
 */
@Data
@ApiModel(value = "查询用户列表请求参数")
public class UserInfoListRequest extends AbstractRequest {

    private Long userId;
    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "排序参数(tntegralNum,answerCount,createTime,id)")
    private String sortField;
    @ApiModelProperty(value = "排序方式(DESC,ASC)")
    private String sort;

    private Integer enabled;

    private String startTime;
    private String endTime;

    @ApiModelProperty(value = "页码",example = "1")
    private Integer page;
    @ApiModelProperty(value = "页大小",example = "10")
    private Integer size;

    @Override
    public void requestCheck() {
        if(page == null || page < 1){
            page = 1;
        }
        if(size == null || size < 1){
            size = 10;
        }
    }
}
